package base.annotation_demo.demo_02;

/**
 * 使用注解完成类和表结构的映射关系
 */
@TabAnnotation("tb_student")
public class Student {

    @FieldAnnotation(columnName = "tb_id", type = "int", length = 10)
    private int id;
    @FieldAnnotation(columnName = "stu_name", type = "varchar", length = 20)
    private String name;
    @FieldAnnotation(columnName = "stu_age", type = "int", length = 3)
    private int age;


    public int getId() {
        return id;
    }

    /**
     * 文档注释
     * @param id 学生编号ID
     */
    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

}
